package bo;

import java.rmi.RemoteException;

public class InterventionCloturee extends InterventionEtat{

        private final String libelle = "CL";

        @Override
        public synchronized boolean setInterventionEtat(Intervention intervention) throws RemoteException {
                if (intervention == null) {
                    return false;
                }
                if (!ListeInterventions.getInstance().contientIntervention(intervention)) {
                    return false;
                }
                //Seule une intervention EnCours peut etre Cloturee
                if (intervention.getStatut().getlibelle().contentEquals("EN")) {
                    return false;
                }
                return true;
        }

        public  synchronized String getlibelle(){
                return this.libelle;
        }
}